package cn.zn.modules.pz.enums;

import lombok.Getter;

@Getter
public enum MoneyTypeEnum {
    FT_001("001", "直接支付"),
    FT_002("002", "授权支付"),
    FT_003("003", "自有资金"),
    ;

    private String code;
    private String name;

    MoneyTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static MoneyTypeEnum findByCode(String code) {
        for (MoneyTypeEnum e : values()) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        return null;
    }
}
